package question;

import comment.Comment;

/**
 *create by tbj
 *
 *	leetCode  283	Move Zeroes
 */
public class Move_Zeros {
	public static void Move(int[] a,int target){
		int n=a.length;
		int k=0;
		for(int i=0;i<n;i++){
			if(a[i] != target){
				Comment.swapIntArr(a, i, k);
				k++;
			}
		}
	}
	public static void main(String[] args) {
		int[] a=new int[]{2,0,6,0,11};
		Move_Zeros.Move(a, 0);
		for (int i : a) {
			System.out.print(i+" ");
		}
	}
}
